class CreateShops < ActiveRecord::Migration
  def self.up
    create_table :shops do |t|
      t.string :name
      t.string :url
      t.string :shop_hash #可以访问店铺和店铺详细页 http://store.taobao.com/shop/view_shop-32279c5553eb712e4ea32f9723de7c4a.htm http://rate.taobao.com/user-rate-32279c5553eb712e4ea32f9723de7c4a.htm
      t.integer :shop_id
      t.integer :province_id
      t.integer :city_id
      t.integer :product_num
      t.integer :total_sales #半年
      t.string :domain
      t.integer :fan_num
      t.string :logo
      t.string :brand
      t.string :discount
      t.integer :user_id #说说页 进入店铺链接
      #主营 多对多
      #标签 多对多
      t.integer :commissionrate #佣金率
      t.integer :credit_rate
      t.string :prom_url #推荐链接
      t.datetime :shop_created_at
      t.string :company_name

      t.timestamps
    end
  end

  def self.down
    drop_table :shops
  end
end
